<?php
allowCors();
if (!methodsRequired(['get'])) return;
if (!checkAdmin($msg)) return;

if(isset($_REQUEST["gp_id"])){
    $group_id = $_REQUEST["gp_id"];
    $group = new Group();
    $group->setGpId($group_id);
    if($db->delete($group)==1){
        $msg->setCode(0);
    }else{
        $msg->setCode(2);
    }
}else{
    $msg->setCode(2);
}
echo $msg;


